<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>登录页面</title>
<script type="text/javascript" src="Content/script/jquery-1.10.2.js"></script>
<script type="text/javascript" src="Content/script/jquery.validate.js"></script>
<script type="text/javascript">
	$(function(){
		$("#form").validate({
			rules:{
				username:{
					required:true},
				password:{
					required:true}
			},
			messages:{
				username:{
					required:"请输入用户名"},
				password:{
					required:"请输入密码"}
					}
		});	
	});
</script>
    <style>
        .footer{clear: both;}
        .footer p {text-align: center;}
        label.error{color:red}
    </style>
    <!-- Bootstrap -->
    <link href="Content/bootstrap/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
<%@ include file="/shared/header.jsp"  %>
    <div id="path">
        <ol class="breadcrumb">
            <li><a href="IndexServlet">首页</a></li>
            <li><a href="register.jsp">注册</a></li>
        </ol>
    </div>
    <div id="content">
        <div class="col-md-5">
            <form class="form-horizontal" method="post" action="LoginServlet" id="form">
                <div class="form-group">
                    <label for="inputUserName3" class="col-sm-2 control-label">用户名</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="username" id="inputUserName3" placeholder="用户名">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">密码</label>
                    <div class="col-sm-10">
                        <input type="password" class="form-control" name="password" id="inputPassword3" placeholder="密码">
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-default">登录</button>&nbsp;&nbsp;<label class="error">${error }</label>
                    </div>
                </div>
            </form>
        </div>
    </div>
        <%@ include file="/shared/footer.jsp" %>

</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="Content/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>